package 蓝桥真题;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class 成绩分析 {
       static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
       final static int N=10010;
       static double a[]=new double[N];
       static int n;
       
       public static void main(String[] args) throws NumberFormatException, IOException {
		      n=Integer.parseInt(br.readLine());
		      double sum=0;
		      for(int i=0;i<n;i++){
		    	  a[i]=Double.parseDouble(br.readLine());
		    	  sum+=a[i];
		      }
		      Arrays.sort(a,0,n);
		      System.out.println(String.format("%.0f",a[n-1]));
		      System.out.println(String.format("%.0f",a[0]));
		      System.out.println(String.format("%.2f",sum/n));
		      
	}
}
